<?php
namespace App\Event\Order;

use App\Event\Event;
use App\Repository\UserRepository;

// 创建订单事件
class CreateEvent extends Event
{
    public $order;
    
    public $product;
    
    public $user;

    public function __construct($order, $product)
    {
        $this->order   = $order;
        $this->product = $product;
        $this->user    = UserRepository::make($this->order->user);
    }
}